<LayoutTableSmall>
    <!-- 搜索 -->
    <template slot="search">
        <el-form :inline="true" label-position="left" label-width="80px" :model="mixinTable_tableSearchData"
            @submit.native.prevent class="demo-form-inline">
            <el-form-item>
                <el-input clearable v-model="mixinTable_tableSearchData.orderNo" placeholder="查询订单号 "
                    @change="mixinTable_searchData" style="width:260px">
                    <el-button slot="append" icon="el-icon-search" @click="mixinTable_searchData()">
                    </el-button>
                </el-input>
            </el-form-item>
            <el-form-item>
                <el-popover width="430" trigger="click">
                    <div class="optionSearch">
                        <el-form label-position="left" label-width="120px" :model="mixinTable_tableSearchSenior">
                            <div class="box">
                                <el-form-item label="订单编号">
                                    <el-input v-model="mixinTable_tableSearchData.orderNo"></el-input>
                                </el-form-item>
                                <el-form-item label="商品名称">
                                    <el-input v-model="mixinTable_tableSearchSenior.productName.value"></el-input>
                                </el-form-item>

                                <el-form-item label="售后订单号">
                                    <el-input v-model="mixinTable_tableSearchSenior.rightNo.value"></el-input>
                                </el-form-item>

                                <el-form-item label="售后时间">
                                    <el-col :span="11">
                                        <el-date-picker placeholder="开始时间"
                                            v-model="mixinTable_tableSearchSenior.createdTimeStartStr.value"
                                            type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;">
                                        </el-date-picker>
                                    </el-col>
                                    <el-col class="line" :span="2" style="text-align: center;">-</el-col>
                                    <el-col :span="11">
                                        <el-date-picker placeholder="结束时间"
                                            v-model="mixinTable_tableSearchSenior.createdTimeEndStr.value"
                                            type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;">
                                        </el-date-picker>
                                    </el-col>
                                </el-form-item>

                            </div>

                            <div class="footer">
                                <el-button @click="mixinTable_searchSeniorReset()">
                                    清空搜索
                                </el-button>
                                <el-button type="primary" @click="mixinTable_searchData()">高级搜索</el-button>
                            </div>


                        </el-form>

                    </div>
                    <el-button slot="reference">高级筛选</el-button>
                </el-popover>
            </el-form-item>
        </el-form>
    </template>
    <!-- 功能 -->
    <template slot="function">
        <el-radio-group v-model="mixinTable_tableSearchSenior.rightType.value" placeholder="请选择"
            @change="rightTypeChange">
            <el-radio-button v-for="item in rightTypeArr" :key="item.value" :label="item.value">{{item.label}}
            </el-radio-button>
        </el-radio-group>
        <el-select v-model="mixinTable_tableSearchSenior.rightStatus.value" placeholder="请选择" style="margin-left:10px;vertical-align: middle; width:100px"
                   v-if="mixinTable_tableSearchSenior.rightType.value !== null" @change="rightStatusChange">
             <el-option v-for="item in rightStatus[mixinTable_tableSearchSenior.rightType.value]" :key="item.value"
                     :label="item.label" :value="item.value">
             </el-option>
        </el-select>
    </template>
    <!-- 表格 -->
    <template slot="table">
        
        <el-table v-loading="mixinTable_loading" :data="mixinTable_tableData" style="width: 100%;" border
        class="tableStyle" :ref="mixinPage_vueName+'TableSmall'" default-expand-all height="100%" row-key="id"
        @selection-change="mixinTable_handleSelectionChangeTableSmall">
    
        <el-table-column type="index" width="50" :index="mixinTable_indexMethod" align="center" label="#">
        </el-table-column>
        <el-table-column prop="rightNo" label="售后订单号"></el-table-column>
        <el-table-column prop="orderNo" label="订单号"></el-table-column>
        <el-table-column prop="name" label="订单状态" align="center" width="90">
            <template slot-scope="scope">{{scope.row.orderRightsFlow.stateDesc}}</template>
        </el-table-column>
        <el-table-column prop="name" label="购买人" width="70" align="center">
            <template slot-scope="scope">
                <el-popover placement="right" width="300" trigger="click">
                    <div class="userBox">
                        <div class="icon">
                            <imageBox :src="scope.row.icon"></imageBox>
                        </div>
                        <div class="text">
                            <div class="name">{{scope.row.nickName}}</div>
                            <div class="id">ID:{{scope.row.memberCode}}</div>
                        </div>
                    </div>
                    <div slot="reference" class="userShow">
                        <div class="icon">
                            <imageBox :src="scope.row.icon"></imageBox>
                        </div>
                        <div class="el-icon-more more"></div>
                    </div>
                </el-popover>
            </template>
        </el-table-column>
      
        <el-table-column prop="name" label="退款方式" align="center" width="90">
            <template slot-scope="scope">{{scope.row.rightType === 1 ? '退款' : '退货退款'}}</template>
        </el-table-column>
        <el-table-column prop="name" label="退款渠道" align="center" width="90">
            <template slot-scope="scope">{{scope.row.refundChannel === 1 ? '原路退回' : '退款余额'}}</template>
        </el-table-column>
        <el-table-column prop="createdTimeStr" label="申请时间" width="120">
            <template slot-scope="scope">{{$vFN.Utils.timestampFormat(scope.row.updatedTime)}}</template>
        </el-table-column>
     
        <el-table-column prop="name" label="售后商品" width="90" align="right">
            <template slot-scope="scope">
                <el-popover placement="right" width="400" trigger="click">
                    <div class="goodsBox">
                        <div class="item" >
                            <div class="albumUrl">
                                <imageBox :src="scope.row.albumUrl" scrollContainer=".list"></imageBox>
                            </div>
                            <div class="text">
                                <div class="name">{{scope.row.productName}}</div>
                                <div class="des">
                                    <div v-if="scope.row.spData">
                                        数量:{{scope.row.buyNum}};{{ JSON.parse(scope.row.spData).textString }}</div>
                                    <div v-else>数量:{{scope.row.buyNum}};无规格</div>
                                </div>
                                <div class="num">
                                    <!-- <div class="n">单:¥{{iitem.activityPrice}}</div> -->
                                    <div class="n">单价:￥{{scope.row.activityPrice}}</div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div slot="reference" class="goodsShow">
                        <div class="item" >
                            <div class="albumUrl">
                                <imageBox :src="scope.row.albumUrl" scrollContainer=".list"></imageBox>
                            </div>
                        </div>
                        <div class="el-icon-more more"></div>
                    </div>
                </el-popover>

            </template>
        </el-table-column>

           
        <el-table-column label="应退金额" align="right">
            <template slot-scope="scope">
                <div class="payAmount">{{$vFN.Tools.toMoneyCount(scope.row.returnAmount)}}</div>
            </template>
        </el-table-column>
        
        <el-table-column label="操作" align="center" width="140">
            <template slot-scope="scope">
                <el-tooltip ceffect="dark" content="订单详情" placement="top">
                    <el-button @click="OrderRefundDetailCilck(scope.row)" icon="el-icon-tickets" circle>
                    </el-button>
                  </el-tooltip>
                <el-dropdown style="margin-left:5px" @command="orderEventClick" v-if="!$vFN.Utils.isEmpty(scope.row.eventList) && scope.row.eventList.length" >
                    <el-button icon="el-icon-more" circle></el-button>
                    <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item :command="[scope.row, iitem,'refund']"
                            v-for="(iitem, iindex) in scope.row.eventList" :key="iitem.id">{{ iitem.eventNote }}
                        </el-dropdown-item>
                    </el-dropdown-menu>
                </el-dropdown>
            </template>
        </el-table-column>

        </el-table>

    </template>
    <!-- 表格选项 -->
    <template slot="options">
     
    </template>
    <!-- 分页 -->
    <template slot="page">
        <el-pagination class="paginationStyle" v-if="mixinTable_pageData.total>0" background
            @current-change="mixinTable_pagingData($event)" :current-page="mixinTable_pageData.pageNum"
            :page-size.sync="$vFN.Constants.pageSize" layout="total, prev, pager, next,jumper"
            :total.sync="mixinTable_pageData.total">
        </el-pagination>
    </template>
</LayoutTableSmall>